import math

x1,y1 = eval(input("请输入第一个坐标点："))
x2,y2 = eval(input("请输入第二个坐标点："))
r = 6371.01
# d = r*math.acos(math.sin(x1)*math.sin(x2)+math.cos(x1)*math.cos(x2)*math.cos(y1-y2)))

d = r * math.acos( math.sin( math.radians(x1) ) * math.sin( math.radians(x2) ) +
                 math.cos( math.radians(x1) ) * math.cos( math.radians(x2) ) *
                 math.cos( math.radians(y1-y2) ) )
# d = 6371.01 * math.acos(math.sin(math.radians(x1)) * math.sin(math.radians(x2)) +
      # math.cos(math.radians(x1)) * math.cos(math.radians(x2)) *
      # math.cos(math.radians(y1 - y2)));
print("两点之间的距离为：",d)